<script lang="ts" setup>

import type {ReplyInfo} from "../../network/types/Reply.ts";
import {toRefs} from "vue";
import UserRoute from "../routes/UserRoute.vue";

interface Props {
  reply: ReplyInfo,
}

const props = defineProps<Props>()
const {reply} = toRefs(props)
</script>

<template>
  <el-tag v-if="reply.replyId!=undefined">{{ reply.postDatetime?.full }}</el-tag>
  <el-tooltip v-if="reply.lastEdit" :disabled="!reply.lastEdit.userId">
    <template #content>
      由
      <user-route :user-id="reply.lastEdit?.userId">
        {{ reply.lastEdit?.username }}
      </user-route>
    </template>
    <el-tag>最后编辑: {{ reply.lastEdit?.timestamp?.full }}</el-tag>
  </el-tooltip>
</template>

<style scoped>

</style>